using System;
using System.Collections;
using System.Diagnostics;
using System.Collections.ObjectModel;

namespace OR.Reuse.Persistence
{
    /// <summary>
    /// Provides base functionality for a Model Collection element.
    /// </summary>
    public class ModelCollectionBase<DETAIL, MANAGER> : ObservableCollection<DETAIL>
    {
        private DETAIL mParentEntity;
        private MANAGER mDataManager;

        public DETAIL ParentEntity
        {
            get { return (mParentEntity); }
            set { mParentEntity = value; }
        }

        public MANAGER DataManager
        {
            get { return (mDataManager); }
            set { mDataManager = value; }
        }

        public ModelCollectionBase(MANAGER dataManager)
        {
            if (dataManager == null)
            {
                throw new ArgumentNullException("dataManager");
            }

            this.DataManager = dataManager;
        }
    }
}
